<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="initial-scale=1, maximum-scale=1">
<link rel="stylesheet" href="http://code.jquery.com/mobile/1.3.1/jquery.mobile-1.3.1.min.css" />
<script src="http://code.jquery.com/jquery-1.9.1.min.js"></script>
<script src="http://code.jquery.com/mobile/1.3.1/jquery.mobile-1.3.1.min.js"></script>
</head>
<body>

<!-- Home -->
<div data-role="page" id="page1">
    <div data-theme="a" data-role="header">
        <h3>
            uuch管理登陆
        </h3>
    </div>
    <div data-role="content">
        <div data-role="fieldcontain">
            <input name="username" id="username" placeholder="请输入用户名" value="" type="text">
        </div>
        <div data-role="fieldcontain">
            <input name="password" id="password" placeholder="请输入密码" value="" type="password">
        </div>
        <a data-role="button" data-inline="true" href="javascript:login();">
            登陆
        </a>
        <a data-role="button" data-inline="true" href="javascript:reset();" style="float:right;">
            重置
        </a>
    </div>
</div>
<script type="text/javascript">
function login(){
    var username = $('#username').val();
    var password = $('#password').val();
    $.post(
        '/admini/managelogin/tabletproccess',
        {'username':username,'password':password},
        function(data){
            if(data === 1){
                window.location.href="/admini/managelogin/tabletlist";
            }else{
                alert("用户名或者密码出错！");
            }    
        }
    ,'json');
}

function reset(){
    $('#username').val("");
    $('#password').val("");
    $('#username').focus();
}
</script>
</body>
</html>